<?php
session_start();

function logged_on(){
	
	return isset($_SESSION["customer"]);
 	
	
}

function check_logon() {
	
	if (!logged_on()) {
		$login = "<label style=\"padding-top:1px; padding-bottom:1px;\"><a style=\"color:#ccc; text-decoration: none;\"href=\"customer_login.php\">Login</a></label>";
		$register = "<label style=\"padding-top:1px; padding-bottom:1px;\"><a style=\"color:#ccc; text-decoration:none;\"href=\"register.php\">Register</a></label>";
 		echo $login;
		echo $register;
	}
	else {
		
		$cus = "<label style=\"padding-top:1px; padding-bottom:1px;\"><a style=\"color:#ccc; text-decoration: none;\"href=\"account.php\">Welcome ";
		$logout = "<label style=\"padding-top:1px; padding-bottom:1px;\"><a style=\"color:#ccc; text-decoration:none;\"href=\"storescripts/logout.php\">Logout</a></label>";
 		echo $cus .$_SESSION["customer"]."</a></label>";
		echo $logout;
		
	}
	
}

?>